package com.aizuda.boot.modules.business.counterparty.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("counterparty_info")
@Schema(description = "交易方信息表")
public class CounterpartyInfoEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Integer id;

    @Schema(description = "交易方编码")
    private String counterpartyCode;

    @Schema(description = "交易方名称")
    private String counterpartyName;

    @Schema(description = "注册国家代码")
    private String registerCountry;

    @Schema(description = "交易方性质")
    private Integer counterpartyNature;

    @Schema(description = "交易方类型")
    private String counterpartyType;

    @Schema(description = "是否关联方(0:否,1:是)")
    private Boolean isRelatedParty;

    @Schema(description = "证件类型")
    private Integer certificateType;

    @Schema(description = "证件ID")
    private String certificateId;

    @Schema(description = "银行信息ID列表(多个用逗号分隔)")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String bankInfoIds;

    @Schema(description = "是否启用(0:停用,1:启用)")
    private Boolean isEnabled;

    @Schema(description = "是否风险(0:否,1:是)")
    private Boolean isRisk;

    @Schema(description = "风险类型")
    private Integer riskType;

    @Schema(description = "创建应用ID")
    private String createAppid;

    @Schema(description = "创建来源")
    private String createSource;

    @Schema(description = "更新应用ID")
    private String updateAppid;

    @Schema(description = "更新来源")
    private String updateSource;

    @Schema(description = "创建人ID")
    private Long createId;

    @Schema(description = "创建人")
    private String createBy;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "修改人")
    private String updateBy;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    @Schema(description = "是否删除(0:否,1:是)")
    @TableLogic
    private Boolean deleted;

    @Schema(description = "附件")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String attachment;
} 